using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace HotelManageSystem.Dto {
    public class GetUserByIdDto {
        public string Id { get; set; } = string.Empty;
    }
    public class GetUserByNameDto {
        public string Name { get; set; } = string.Empty;
    }
    public class GetUserDto {
        public string Id { get; set; } = string.Empty;
        public string Name { get; set; } = string.Empty;
        public EnumGender Gender { get; set; }
        public EnumContactType ContactType { get; set; } = EnumContactType.Telephone;
        public string ContactData { get; set; } = string.Empty;
    }
    public class AddUserDto {
        public string Id { get; set; } = string.Empty;
        public string Name { get; set; } = string.Empty;
        public EnumGender Gender { get; set; }
        public EnumContactType ContactType { get; set; } = EnumContactType.Telephone;
        public string ContactData { get; set; } = string.Empty;
    }

    public class GetWorkerDto {
        public int Id { get; set; }
        public string Name { get; set; } = string.Empty;
        public EnumGender Gender { get; set; }
        public EnumWorkerJob Job { get; set; }
        public EnumContactType ContactType { get; set; } = EnumContactType.Telephone;
        public string ContactData { get; set; } = string.Empty;
    }
    public class AddWorkerDto {
        public string Password { get; set; } = string.Empty;
        public string Name { get; set; } = string.Empty;
        public EnumGender Gender { get; set; }
        public EnumWorkerJob Job { get; set; }
        public EnumContactType ContactType { get; set; } = EnumContactType.Telephone;
        public string ContactData { get; set; } = string.Empty;

        // Authentication ----------------
        public EnumPriviledgeLevel PriviledgeLevel { get; set; }
    }

    public class GetRoomDto {
        public int Id { get; set; }
        public decimal Price { get; set; }
        public EnumRoomModel Model { get; set; }
        public EnumRoomState State { get; set; }
    }
    public class AddRoomDto {
        public int Id { get; set; }
        public EnumRoomModel Model { get; set; }
    }
    public class GetRTypeInfoDto {
        public EnumRoomModel Id { get; set; }
        public int Ramaining { get; set; }
        public decimal Price { get; set; }
    }
    public class GetCheckInInfoDto {
        public string UserId { get; set; } = string.Empty;
        public int WorkerId { get; set; }
        public int RoomId { get; set; }
        public DateTime? InTime { get; set; }
        public DateTime? OutTime { get; set; }
    }
    public class AddCheckInInfoDto {
        public int PreOrderId { get; set; }
    }
    public class SearchCheckInInfoDto {
        public string UserId { get; set; } = string.Empty;
        public string UserName { get; set; } = string.Empty;
        public int WorkerId { get; set; }
        public string WorkerName { get; set; } = string.Empty;
        public int RoomId { get; set; }
        public EnumRoomModel Model { get; set; }
        public DateTime? InTime { get; set; }
        public DateTime? OutTime { get; set; }
    }
    public class CheckOutDto {
        public string UserId { get; set; } = string.Empty;
        public int RoomId { get; set; }

    }
    public class AddBillDto {
        public string Item { get; set; } = string.Empty;
        public decimal Price { get; set; }
        public DateTime Time { get; set; }
    }
    public class 房间变更Dto {
        public string UserId { get; set;}
        public int targetRoomId { get; set; }
    }
    public class 房间状态变更Dto {
        public int RoomId { get; set; }
        public EnumRoomState State { get; set; }
    }

    public class 获取预定信息Dto {
        public int Id { get; set; }
        public string UserId { get; set; } = string.Empty;
        public string UserName { get; set; } = string.Empty;
        public int WorkerId { get; set; }
        public string WorkerName { get; set; } = string.Empty;
        public int RoomId { get; set; }
        public EnumRoomModel Model{ get; set; }
        public DateTime? InTime { get; set; }
        public DateTime? OutTime { get; set; }
    }
    public class 更改房间价格Dto {
        public EnumRoomModel RoomModel { get; set; }
        public decimal Price { get; set; }
    }
    public class 添加账单Dto {
        public int RoomId { get; set; }
        public string Item { get; set; } = string.Empty;
        public decimal Price { get; set; }
        public int Quantity { get; set; }
        public DateTime Time { get; set; }
    }
    public class 获取账单信息Dto {
        public int RoomId { get; set; }
        public List<单账单Dto> Bills { get; set; } = new List<单账单Dto>();
        public decimal Sum { get; set; }
    }
    public class 单账单Dto {
        public int Id { get; set; }
        public string Item { get; set; } = string.Empty;
        [Column(TypeName = "decimal(18,2)")]
        public decimal Price { get; set; }
        public DateTime Time { get; set; }
    }
    public class 入住Dto {
        public string UserId { get; set; } = string.Empty;
        public string UserName { get; set; } = string.Empty;
        public int RoomId { get; set; }
        public EnumGender Gender { get; set; }
        public EnumContactType ContactType { get; set; } = EnumContactType.Telephone;
        public string ContactData { get; set; } = string.Empty;

        public DateTime InTime { get; set; }
        public DateTime OutTime { get; set; }
    }
    public class 通过预定入住Dto {
        public int PreOrderId { get; set;}
    }
    public class 结账Dto {
        public int RoomId{get;set;}
    }
    public class AddPreOrderDto {
        public string UserId { get; set; } = string.Empty;
        public string UserName { get; set; } = string.Empty;
        public int RoomId { get; set; }
        public EnumGender Gender { get; set; }
        public EnumContactType ContactType { get; set; } = EnumContactType.Telephone;
        public string ContactData { get; set; } = string.Empty;
        
        public DateTime InTime { get; set; }
        public DateTime OutTime { get; set; }
    }
    public class CancelPreOrderDto {
        public string UserId { get; set; } = string.Empty;
        public int RoomId { get; set; }
    }
    public class UpdateRoomDto {
        public int Id { get; set; }

    }


}